<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<style>
    .father {
        width: 200px;
        height: 200px;
        background-color: hotpink;
    }
    .son {
        width: 100px;
        height: 100px;
        background-color: blue;
    }
</style>
<body>
<div id="app">
    <span>姓名：</span><input type="text" v-model.trim="userName">
    <span>密码：</span><input type="password" v-model.trim="passWord">
    <div class="father" @click="father">
        <div class="son" @click.stop="son"></div>
    </div>
    <a href="http://www.baidu.dom" @click.prevent>百度一下</a>
</div>


</body>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            userName: '',
            passWord: ''
        },
        methods: {
            father(){
                alert('父亲被点击了！')
            },
            son(){
                alert('儿子被点击了！')
            }
        }
    })
</script>
</html>